upto($n$) $\,\equiv$$_{\mbox{\scriptsize def}}$$\;\;$if ($n$ =$_{0}$ 0) then [] else append(upto(($n$ {-} 1)); cons(($n$ {-} 1); [])) fi \\[0ex]\emph{(recursive)}